package com.uye.framework.exception;

import com.uye.framework.util.ResponseCodes;

/**
 * Exception thrown when a command is executed without being initialized
 * properly.
 * 
 * @author uye
 * 
 */
@SuppressWarnings("serial")
public class CommandNotReadyForExecutionException extends
		InternalServerException {

	public CommandNotReadyForExecutionException(final String serviceName,
			final String message) {
		super(serviceName, message);

	}

	/**
	 * Stores where the exception occurred.
	 * 
	 * @param message
	 *           Description of why the command failed
	 */
	public CommandNotReadyForExecutionException(final String message) {
		super(message);

	}

	public CommandNotReadyForExecutionException(Throwable cause) {
		super(cause);
	}

	public CommandNotReadyForExecutionException( final String serviceName,
			final String message, final Throwable cause) {
		super(serviceName, message, cause);

	}

	/**
	 * Stores what triggered the exception, and where it happened.
	 * 
	 * @param cause
	 *            The current trace of the exception
	 * @param serviceName
	 *            Name of the failed service
	 */
	public CommandNotReadyForExecutionException(final String serviceName,
			final Throwable cause) {
		super(serviceName, cause);
	}

	@Override
	public String getErrorCode() {
		return ResponseCodes.BASE_ERROR_CODES.ERROR_500.toString();
	}

}
